feat(i18n): update translations#1633
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
1 Job Failed: CI / Test and Build / Test and Build failed on "Build application" |
There was a problem hiding this comment.
Greptile Overview
Summary
This automated translation PR contains critical file corruption that makes all 10 files unusable. The translation pipeline has failed catastrophically.
Key Issues:
-
All
guardrails.mdxfiles (5 languages): Regex pattern truncated mid-line at line 68, followed by complete file duplication from the beginning. Files are approximately 2x their correct size. -
All
typescript.mdxfiles (5 languages): Multiple instances of content duplication (2-3x), strings split mid-line (console.log statements broken), malformed code blocks with incorrect markdown syntax, and completely broken file structure.
Root Cause: The Lingo.dev AI translation engine appears to have corrupted the files during processing, likely due to:
- Improper handling of code blocks and inline code
- Failure to preserve markdown structure
- String concatenation errors during translation
Required Action: This PR must be rejected and the translation pipeline investigated and fixed before re-running translations.
Confidence Score: 0/5
- This PR is completely unsafe to merge and will break documentation for all translated languages
- All 10 files contain severe corruption including duplicated content, truncated strings, and malformed code blocks that would render the documentation unusable. This would break the documentation site for 5 languages.
- All 10 files are critically corrupted and require complete regeneration:
guardrails.mdxfiles have 2x content duplication,typescript.mdxfiles have 2-3x duplication and broken code blocks
Important Files Changed
File Analysis
| Filename | Score | Overview |
|---|---|---|
| apps/docs/content/docs/de/blocks/guardrails.mdx | 0/5 | File corrupted - regex pattern truncated and entire content duplicated starting at line 68 |
| apps/docs/content/docs/es/blocks/guardrails.mdx | 0/5 | File corrupted - regex pattern truncated and entire content duplicated starting at line 68 |
| apps/docs/content/docs/fr/blocks/guardrails.mdx | 0/5 | File corrupted - regex pattern truncated and entire content duplicated starting at line 68 |
| apps/docs/content/docs/ja/blocks/guardrails.mdx | 0/5 | File corrupted - regex pattern truncated and entire content duplicated starting at line 68 |
| apps/docs/content/docs/zh/blocks/guardrails.mdx | 0/5 | File corrupted - regex pattern truncated and entire content duplicated starting at line 68 |
| apps/docs/content/docs/de/sdks/typescript.mdx | 0/5 | Malformed code blocks, truncated strings, and duplicated sections - file structure broken |
| apps/docs/content/docs/es/sdks/typescript.mdx | 0/5 | Massive content duplication (2-3x), strings split mid-line, completely broken structure |
| apps/docs/content/docs/fr/sdks/typescript.mdx | 0/5 | Massive content duplication (2-3x), strings split mid-line, completely broken structure |
| apps/docs/content/docs/ja/sdks/typescript.mdx | 0/5 | Likely has same corruption patterns as other typescript.mdx translations |
| apps/docs/content/docs/zh/sdks/typescript.mdx | 0/5 | Likely has same corruption patterns as other typescript.mdx translations |
Sequence Diagram
sequenceDiagram
participant Dev as Developer
participant GH as GitHub Actions
participant Lingo as Lingo.dev AI
participant Repo as Repository
Dev->>Repo: Commit changes to English docs
Repo->>GH: Trigger i18n workflow
GH->>Lingo: Send English content for translation
Lingo->>Lingo: Process translations (5 languages)
Lingo-->>GH: Return translated content
Note over Lingo,GH: CORRUPTION OCCURRED HERE
GH->>Repo: Create PR with corrupted translations
Note over Repo: Files contain duplicated content,<br/>truncated strings, broken code blocks
Additional Comments (3)
-
apps/docs/content/docs/de/sdks/typescript.mdx, line 824-966 (link)syntax: Code blocks are malformed - missing closing backticks and language identifiers. Line 818 shows:
console.log('Coût de la période actuelle : ' + limits.usage.currentPeriodCost.toFixed(2) + '
String is truncated mid-line, followed by duplicate section insertion. Code blocks at lines 830, 851, and 868 have incorrect formatting with standalone backticks and "typescript" on separate lines instead of proper markdown fences.
-
apps/docs/content/docs/es/sdks/typescript.mdx, line 818-1281 (link)syntax: Massive duplication - content from lines 818-1000+ is duplicated 2-3 times within the file. Console.log statements are split mid-string and entire sections are repeated. The file structure is completely broken.
-
apps/docs/content/docs/fr/sdks/typescript.mdx, line 818-1281 (link)syntax: Same massive duplication issue as Spanish version. Content is repeated multiple times, strings are truncated mid-line, and code blocks are malformed.
10 files reviewed, 8 comments
| - **Regex Pattern**: The regular expression to match against (e.g., `^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}--- | ||
| title: Guardrails | ||
| --- | ||
|
|
||
| import { Callout } from 'fumadocs-ui/components/callout' | ||
| import { Step, Steps } from 'fumadocs-ui/components/steps' | ||
| import { Tab, Tabs } from 'fumadocs-ui/components/tabs' | ||
| import { Image } from '@/components/ui/image' | ||
| import { Video } from '@/components/ui/video' | ||
|
|
||
| The Guardrails block validates and protects your AI workflows by checking content against multiple validation types. Ensure data quality, prevent hallucinations, detect PII, and enforce format requirements before content moves through your workflow. | ||
|
|
||
| <div className="flex justify-center"> | ||
| <Image | ||
| src="/static/blocks/guardrails.png" | ||
| alt="Guardrails Block" | ||
| width={500} | ||
| height={350} | ||
| className="my-6" | ||
| /> | ||
| </div> | ||
|
|
||
| ## Overview | ||
|
|
||
| The Guardrails block enables you to: | ||
|
|
||
| <Steps> | ||
| <Step> | ||
| <strong>Validate JSON Structure</strong>: Ensure LLM outputs are valid JSON before parsing | ||
| </Step> | ||
| <Step> | ||
| <strong>Match Regex Patterns</strong>: Verify content matches specific formats (emails, phone numbers, URLs, etc.) | ||
| </Step> | ||
| <Step> | ||
| <strong>Detect Hallucinations</strong>: Use RAG + LLM scoring to validate AI outputs against knowledge base content | ||
| </Step> | ||
| <Step> | ||
| <strong>Detect PII</strong>: Identify and optionally mask personally identifiable information across 40+ entity types | ||
| </Step> | ||
| </Steps> | ||
|
|
||
| ## Validation Types | ||
|
|
||
| ### JSON Validation | ||
|
|
||
| Validates that content is properly formatted JSON. Perfect for ensuring structured LLM outputs can be safely parsed. | ||
|
|
||
| **Use Cases:** | ||
| - Validate JSON responses from Agent blocks before parsing | ||
| - Ensure API payloads are properly formatted | ||
| - Check structured data integrity | ||
|
|
||
| **Output:** | ||
| - `passed`: `true` if valid JSON, `false` otherwise | ||
| - `error`: Error message if validation fails (e.g., "Invalid JSON: Unexpected token...") | ||
|
|
||
| ### Regex Validation | ||
|
|
||
| Checks if content matches a specified regular expression pattern. | ||
|
|
||
| **Use Cases:** | ||
| - Validate email addresses | ||
| - Check phone number formats | ||
| - Verify URLs or custom identifiers | ||
| - Enforce specific text patterns | ||
|
|
||
| **Configuration:** | ||
| - **Regex Pattern**: The regular expression to match against (e.g., for emails) |
There was a problem hiding this comment.
syntax: The regex pattern is truncated mid-line and entire file content is duplicated starting at line 68. The line reads:
- **Regex Pattern**: The regular expression to match against (e.g., `^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}---
This should end with:
\.[a-zA-Z]{2,}$` for emails)
Instead, --- (frontmatter marker) appears immediately after, followed by the entire file being duplicated from the beginning.
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/docs/content/docs/de/blocks/guardrails.mdx
Line: 68:135
Comment:
**syntax:** The regex pattern is truncated mid-line and entire file content is duplicated starting at line 68. The line reads:
```
- **Regex Pattern**: The regular expression to match against (e.g., `^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}---
```
This should end with:
```
\.[a-zA-Z]{2,}$` for emails)
```
Instead, `---` (frontmatter marker) appears immediately after, followed by the entire file being duplicated from the beginning.
How can I resolve this? If you propose a fix, please make it concise.| - **Regex Pattern**: The regular expression to match against (e.g., `^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}--- | ||
| title: Guardrails | ||
| --- | ||
|
|
||
| import { Callout } from 'fumadocs-ui/components/callout' | ||
| import { Step, Steps } from 'fumadocs-ui/components/steps' | ||
| import { Tab, Tabs } from 'fumadocs-ui/components/tabs' | ||
| import { Image } from '@/components/ui/image' | ||
| import { Video } from '@/components/ui/video' | ||
|
|
||
| The Guardrails block validates and protects your AI workflows by checking content against multiple validation types. Ensure data quality, prevent hallucinations, detect PII, and enforce format requirements before content moves through your workflow. | ||
|
|
||
| <div className="flex justify-center"> | ||
| <Image | ||
| src="/static/blocks/guardrails.png" | ||
| alt="Guardrails Block" | ||
| width={500} | ||
| height={350} | ||
| className="my-6" | ||
| /> | ||
| </div> | ||
|
|
||
| ## Overview | ||
|
|
||
| The Guardrails block enables you to: | ||
|
|
||
| <Steps> | ||
| <Step> | ||
| <strong>Validate JSON Structure</strong>: Ensure LLM outputs are valid JSON before parsing | ||
| </Step> | ||
| <Step> | ||
| <strong>Match Regex Patterns</strong>: Verify content matches specific formats (emails, phone numbers, URLs, etc.) | ||
| </Step> | ||
| <Step> | ||
| <strong>Detect Hallucinations</strong>: Use RAG + LLM scoring to validate AI outputs against knowledge base content | ||
| </Step> | ||
| <Step> | ||
| <strong>Detect PII</strong>: Identify and optionally mask personally identifiable information across 40+ entity types | ||
| </Step> | ||
| </Steps> | ||
|
|
||
| ## Validation Types | ||
|
|
||
| ### JSON Validation | ||
|
|
||
| Validates that content is properly formatted JSON. Perfect for ensuring structured LLM outputs can be safely parsed. | ||
|
|
||
| **Use Cases:** | ||
| - Validate JSON responses from Agent blocks before parsing | ||
| - Ensure API payloads are properly formatted | ||
| - Check structured data integrity | ||
|
|
||
| **Output:** | ||
| - `passed`: `true` if valid JSON, `false` otherwise | ||
| - `error`: Error message if validation fails (e.g., "Invalid JSON: Unexpected token...") | ||
|
|
||
| ### Regex Validation | ||
|
|
||
| Checks if content matches a specified regular expression pattern. | ||
|
|
||
| **Use Cases:** | ||
| - Validate email addresses | ||
| - Check phone number formats | ||
| - Verify URLs or custom identifiers | ||
| - Enforce specific text patterns | ||
|
|
||
| **Configuration:** | ||
| - **Regex Pattern**: The regular expression to match against (e.g., for emails) |
There was a problem hiding this comment.
syntax: Same corruption as German version - regex pattern truncated and entire file duplicated.
| - **Regex Pattern**: The regular expression to match against (e.g., `^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}--- | |
| title: Guardrails | |
| --- | |
| import { Callout } from 'fumadocs-ui/components/callout' | |
| import { Step, Steps } from 'fumadocs-ui/components/steps' | |
| import { Tab, Tabs } from 'fumadocs-ui/components/tabs' | |
| import { Image } from '@/components/ui/image' | |
| import { Video } from '@/components/ui/video' | |
| The Guardrails block validates and protects your AI workflows by checking content against multiple validation types. Ensure data quality, prevent hallucinations, detect PII, and enforce format requirements before content moves through your workflow. | |
| <div className="flex justify-center"> | |
| <Image | |
| src="/static/blocks/guardrails.png" | |
| alt="Guardrails Block" | |
| width={500} | |
| height={350} | |
| className="my-6" | |
| /> | |
| </div> | |
| ## Overview | |
| The Guardrails block enables you to: | |
| <Steps> | |
| <Step> | |
| <strong>Validate JSON Structure</strong>: Ensure LLM outputs are valid JSON before parsing | |
| </Step> | |
| <Step> | |
| <strong>Match Regex Patterns</strong>: Verify content matches specific formats (emails, phone numbers, URLs, etc.) | |
| </Step> | |
| <Step> | |
| <strong>Detect Hallucinations</strong>: Use RAG + LLM scoring to validate AI outputs against knowledge base content | |
| </Step> | |
| <Step> | |
| <strong>Detect PII</strong>: Identify and optionally mask personally identifiable information across 40+ entity types | |
| </Step> | |
| </Steps> | |
| ## Validation Types | |
| ### JSON Validation | |
| Validates that content is properly formatted JSON. Perfect for ensuring structured LLM outputs can be safely parsed. | |
| **Use Cases:** | |
| - Validate JSON responses from Agent blocks before parsing | |
| - Ensure API payloads are properly formatted | |
| - Check structured data integrity | |
| **Output:** | |
| - `passed`: `true` if valid JSON, `false` otherwise | |
| - `error`: Error message if validation fails (e.g., "Invalid JSON: Unexpected token...") | |
| ### Regex Validation | |
| Checks if content matches a specified regular expression pattern. | |
| **Use Cases:** | |
| - Validate email addresses | |
| - Check phone number formats | |
| - Verify URLs or custom identifiers | |
| - Enforce specific text patterns | |
| **Configuration:** | |
| - **Regex Pattern**: The regular expression to match against (e.g., for emails) | |
| - **Regex Pattern**: The regular expression to match against (e.g., `^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$` for emails) |
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/docs/content/docs/es/blocks/guardrails.mdx
Line: 68:135
Comment:
**syntax:** Same corruption as German version - regex pattern truncated and entire file duplicated.
```suggestion
- **Regex Pattern**: The regular expression to match against (e.g., `^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$` for emails)
```
How can I resolve this? If you propose a fix, please make it concise.| - **Regex Pattern**: The regular expression to match against (e.g., `^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}--- | ||
| title: Guardrails | ||
| --- | ||
|
|
||
| import { Callout } from 'fumadocs-ui/components/callout' | ||
| import { Step, Steps } from 'fumadocs-ui/components/steps' | ||
| import { Tab, Tabs } from 'fumadocs-ui/components/tabs' | ||
| import { Image } from '@/components/ui/image' | ||
| import { Video } from '@/components/ui/video' | ||
|
|
||
| The Guardrails block validates and protects your AI workflows by checking content against multiple validation types. Ensure data quality, prevent hallucinations, detect PII, and enforce format requirements before content moves through your workflow. | ||
|
|
||
| <div className="flex justify-center"> | ||
| <Image | ||
| src="/static/blocks/guardrails.png" | ||
| alt="Guardrails Block" | ||
| width={500} | ||
| height={350} | ||
| className="my-6" | ||
| /> | ||
| </div> | ||
|
|
||
| ## Overview | ||
|
|
||
| The Guardrails block enables you to: | ||
|
|
||
| <Steps> | ||
| <Step> | ||
| <strong>Validate JSON Structure</strong>: Ensure LLM outputs are valid JSON before parsing | ||
| </Step> | ||
| <Step> | ||
| <strong>Match Regex Patterns</strong>: Verify content matches specific formats (emails, phone numbers, URLs, etc.) | ||
| </Step> | ||
| <Step> | ||
| <strong>Detect Hallucinations</strong>: Use RAG + LLM scoring to validate AI outputs against knowledge base content | ||
| </Step> | ||
| <Step> | ||
| <strong>Detect PII</strong>: Identify and optionally mask personally identifiable information across 40+ entity types | ||
| </Step> | ||
| </Steps> | ||
|
|
||
| ## Validation Types | ||
|
|
||
| ### JSON Validation | ||
|
|
||
| Validates that content is properly formatted JSON. Perfect for ensuring structured LLM outputs can be safely parsed. | ||
|
|
||
| **Use Cases:** | ||
| - Validate JSON responses from Agent blocks before parsing | ||
| - Ensure API payloads are properly formatted | ||
| - Check structured data integrity | ||
|
|
||
| **Output:** | ||
| - `passed`: `true` if valid JSON, `false` otherwise | ||
| - `error`: Error message if validation fails (e.g., "Invalid JSON: Unexpected token...") | ||
|
|
||
| ### Regex Validation | ||
|
|
||
| Checks if content matches a specified regular expression pattern. | ||
|
|
||
| **Use Cases:** | ||
| - Validate email addresses | ||
| - Check phone number formats | ||
| - Verify URLs or custom identifiers | ||
| - Enforce specific text patterns | ||
|
|
||
| **Configuration:** | ||
| - **Regex Pattern**: The regular expression to match against (e.g., for emails) |
There was a problem hiding this comment.
syntax: Same corruption as other language versions - regex pattern truncated and entire file duplicated.
| - **Regex Pattern**: The regular expression to match against (e.g., `^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}--- | |
| title: Guardrails | |
| --- | |
| import { Callout } from 'fumadocs-ui/components/callout' | |
| import { Step, Steps } from 'fumadocs-ui/components/steps' | |
| import { Tab, Tabs } from 'fumadocs-ui/components/tabs' | |
| import { Image } from '@/components/ui/image' | |
| import { Video } from '@/components/ui/video' | |
| The Guardrails block validates and protects your AI workflows by checking content against multiple validation types. Ensure data quality, prevent hallucinations, detect PII, and enforce format requirements before content moves through your workflow. | |
| <div className="flex justify-center"> | |
| <Image | |
| src="/static/blocks/guardrails.png" | |
| alt="Guardrails Block" | |
| width={500} | |
| height={350} | |
| className="my-6" | |
| /> | |
| </div> | |
| ## Overview | |
| The Guardrails block enables you to: | |
| <Steps> | |
| <Step> | |
| <strong>Validate JSON Structure</strong>: Ensure LLM outputs are valid JSON before parsing | |
| </Step> | |
| <Step> | |
| <strong>Match Regex Patterns</strong>: Verify content matches specific formats (emails, phone numbers, URLs, etc.) | |
| </Step> | |
| <Step> | |
| <strong>Detect Hallucinations</strong>: Use RAG + LLM scoring to validate AI outputs against knowledge base content | |
| </Step> | |
| <Step> | |
| <strong>Detect PII</strong>: Identify and optionally mask personally identifiable information across 40+ entity types | |
| </Step> | |
| </Steps> | |
| ## Validation Types | |
| ### JSON Validation | |
| Validates that content is properly formatted JSON. Perfect for ensuring structured LLM outputs can be safely parsed. | |
| **Use Cases:** | |
| - Validate JSON responses from Agent blocks before parsing | |
| - Ensure API payloads are properly formatted | |
| - Check structured data integrity | |
| **Output:** | |
| - `passed`: `true` if valid JSON, `false` otherwise | |
| - `error`: Error message if validation fails (e.g., "Invalid JSON: Unexpected token...") | |
| ### Regex Validation | |
| Checks if content matches a specified regular expression pattern. | |
| **Use Cases:** | |
| - Validate email addresses | |
| - Check phone number formats | |
| - Verify URLs or custom identifiers | |
| - Enforce specific text patterns | |
| **Configuration:** | |
| - **Regex Pattern**: The regular expression to match against (e.g., for emails) | |
| - **Regex Pattern**: The regular expression to match against (e.g., `^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$` for emails) |
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/docs/content/docs/fr/blocks/guardrails.mdx
Line: 68:135
Comment:
**syntax:** Same corruption as other language versions - regex pattern truncated and entire file duplicated.
```suggestion
- **Regex Pattern**: The regular expression to match against (e.g., `^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$` for emails)
```
How can I resolve this? If you propose a fix, please make it concise.| - **Regex Pattern**: The regular expression to match against (e.g., `^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}--- | ||
| title: Guardrails | ||
| --- | ||
|
|
||
| import { Callout } from 'fumadocs-ui/components/callout' | ||
| import { Step, Steps } from 'fumadocs-ui/components/steps' | ||
| import { Tab, Tabs } from 'fumadocs-ui/components/tabs' | ||
| import { Image } from '@/components/ui/image' | ||
| import { Video } from '@/components/ui/video' | ||
|
|
||
| The Guardrails block validates and protects your AI workflows by checking content against multiple validation types. Ensure data quality, prevent hallucinations, detect PII, and enforce format requirements before content moves through your workflow. | ||
|
|
||
| <div className="flex justify-center"> | ||
| <Image | ||
| src="/static/blocks/guardrails.png" | ||
| alt="Guardrails Block" | ||
| width={500} | ||
| height={350} | ||
| className="my-6" | ||
| /> | ||
| </div> | ||
|
|
||
| ## Overview | ||
|
|
||
| The Guardrails block enables you to: | ||
|
|
||
| <Steps> | ||
| <Step> | ||
| <strong>Validate JSON Structure</strong>: Ensure LLM outputs are valid JSON before parsing | ||
| </Step> | ||
| <Step> | ||
| <strong>Match Regex Patterns</strong>: Verify content matches specific formats (emails, phone numbers, URLs, etc.) | ||
| </Step> | ||
| <Step> | ||
| <strong>Detect Hallucinations</strong>: Use RAG + LLM scoring to validate AI outputs against knowledge base content | ||
| </Step> | ||
| <Step> | ||
| <strong>Detect PII</strong>: Identify and optionally mask personally identifiable information across 40+ entity types | ||
| </Step> | ||
| </Steps> | ||
|
|
||
| ## Validation Types | ||
|
|
||
| ### JSON Validation | ||
|
|
||
| Validates that content is properly formatted JSON. Perfect for ensuring structured LLM outputs can be safely parsed. | ||
|
|
||
| **Use Cases:** | ||
| - Validate JSON responses from Agent blocks before parsing | ||
| - Ensure API payloads are properly formatted | ||
| - Check structured data integrity | ||
|
|
||
| **Output:** | ||
| - `passed`: `true` if valid JSON, `false` otherwise | ||
| - `error`: Error message if validation fails (e.g., "Invalid JSON: Unexpected token...") | ||
|
|
||
| ### Regex Validation | ||
|
|
||
| Checks if content matches a specified regular expression pattern. | ||
|
|
||
| **Use Cases:** | ||
| - Validate email addresses | ||
| - Check phone number formats | ||
| - Verify URLs or custom identifiers | ||
| - Enforce specific text patterns | ||
|
|
||
| **Configuration:** | ||
| - **Regex Pattern**: The regular expression to match against (e.g., for emails) |
There was a problem hiding this comment.
syntax: Same corruption as other language versions - regex pattern truncated and entire file duplicated.
| - **Regex Pattern**: The regular expression to match against (e.g., `^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}--- | |
| title: Guardrails | |
| --- | |
| import { Callout } from 'fumadocs-ui/components/callout' | |
| import { Step, Steps } from 'fumadocs-ui/components/steps' | |
| import { Tab, Tabs } from 'fumadocs-ui/components/tabs' | |
| import { Image } from '@/components/ui/image' | |
| import { Video } from '@/components/ui/video' | |
| The Guardrails block validates and protects your AI workflows by checking content against multiple validation types. Ensure data quality, prevent hallucinations, detect PII, and enforce format requirements before content moves through your workflow. | |
| <div className="flex justify-center"> | |
| <Image | |
| src="/static/blocks/guardrails.png" | |
| alt="Guardrails Block" | |
| width={500} | |
| height={350} | |
| className="my-6" | |
| /> | |
| </div> | |
| ## Overview | |
| The Guardrails block enables you to: | |
| <Steps> | |
| <Step> | |
| <strong>Validate JSON Structure</strong>: Ensure LLM outputs are valid JSON before parsing | |
| </Step> | |
| <Step> | |
| <strong>Match Regex Patterns</strong>: Verify content matches specific formats (emails, phone numbers, URLs, etc.) | |
| </Step> | |
| <Step> | |
| <strong>Detect Hallucinations</strong>: Use RAG + LLM scoring to validate AI outputs against knowledge base content | |
| </Step> | |
| <Step> | |
| <strong>Detect PII</strong>: Identify and optionally mask personally identifiable information across 40+ entity types | |
| </Step> | |
| </Steps> | |
| ## Validation Types | |
| ### JSON Validation | |
| Validates that content is properly formatted JSON. Perfect for ensuring structured LLM outputs can be safely parsed. | |
| **Use Cases:** | |
| - Validate JSON responses from Agent blocks before parsing | |
| - Ensure API payloads are properly formatted | |
| - Check structured data integrity | |
| **Output:** | |
| - `passed`: `true` if valid JSON, `false` otherwise | |
| - `error`: Error message if validation fails (e.g., "Invalid JSON: Unexpected token...") | |
| ### Regex Validation | |
| Checks if content matches a specified regular expression pattern. | |
| **Use Cases:** | |
| - Validate email addresses | |
| - Check phone number formats | |
| - Verify URLs or custom identifiers | |
| - Enforce specific text patterns | |
| **Configuration:** | |
| - **Regex Pattern**: The regular expression to match against (e.g., for emails) | |
| - **Regex Pattern**: The regular expression to match against (e.g., `^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$` for emails) |
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/docs/content/docs/ja/blocks/guardrails.mdx
Line: 68:135
Comment:
**syntax:** Same corruption as other language versions - regex pattern truncated and entire file duplicated.
```suggestion
- **Regex Pattern**: The regular expression to match against (e.g., `^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$` for emails)
```
How can I resolve this? If you propose a fix, please make it concise.| - **Regex Pattern**: The regular expression to match against (e.g., `^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}--- | ||
| title: Guardrails | ||
| --- | ||
|
|
||
| import { Callout } from 'fumadocs-ui/components/callout' | ||
| import { Step, Steps } from 'fumadocs-ui/components/steps' | ||
| import { Tab, Tabs } from 'fumadocs-ui/components/tabs' | ||
| import { Image } from '@/components/ui/image' | ||
| import { Video } from '@/components/ui/video' | ||
|
|
||
| The Guardrails block validates and protects your AI workflows by checking content against multiple validation types. Ensure data quality, prevent hallucinations, detect PII, and enforce format requirements before content moves through your workflow. | ||
|
|
||
| <div className="flex justify-center"> | ||
| <Image | ||
| src="/static/blocks/guardrails.png" | ||
| alt="Guardrails Block" | ||
| width={500} | ||
| height={350} | ||
| className="my-6" | ||
| /> | ||
| </div> | ||
|
|
||
| ## Overview | ||
|
|
||
| The Guardrails block enables you to: | ||
|
|
||
| <Steps> | ||
| <Step> | ||
| <strong>Validate JSON Structure</strong>: Ensure LLM outputs are valid JSON before parsing | ||
| </Step> | ||
| <Step> | ||
| <strong>Match Regex Patterns</strong>: Verify content matches specific formats (emails, phone numbers, URLs, etc.) | ||
| </Step> | ||
| <Step> | ||
| <strong>Detect Hallucinations</strong>: Use RAG + LLM scoring to validate AI outputs against knowledge base content | ||
| </Step> | ||
| <Step> | ||
| <strong>Detect PII</strong>: Identify and optionally mask personally identifiable information across 40+ entity types | ||
| </Step> | ||
| </Steps> | ||
|
|
||
| ## Validation Types | ||
|
|
||
| ### JSON Validation | ||
|
|
||
| Validates that content is properly formatted JSON. Perfect for ensuring structured LLM outputs can be safely parsed. | ||
|
|
||
| **Use Cases:** | ||
| - Validate JSON responses from Agent blocks before parsing | ||
| - Ensure API payloads are properly formatted | ||
| - Check structured data integrity | ||
|
|
||
| **Output:** | ||
| - `passed`: `true` if valid JSON, `false` otherwise | ||
| - `error`: Error message if validation fails (e.g., "Invalid JSON: Unexpected token...") | ||
|
|
||
| ### Regex Validation | ||
|
|
||
| Checks if content matches a specified regular expression pattern. | ||
|
|
||
| **Use Cases:** | ||
| - Validate email addresses | ||
| - Check phone number formats | ||
| - Verify URLs or custom identifiers | ||
| - Enforce specific text patterns | ||
|
|
||
| **Configuration:** | ||
| - **Regex Pattern**: The regular expression to match against (e.g., for emails) |
There was a problem hiding this comment.
syntax: Same corruption as other language versions - regex pattern truncated and entire file duplicated.
| - **Regex Pattern**: The regular expression to match against (e.g., `^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}--- | |
| title: Guardrails | |
| --- | |
| import { Callout } from 'fumadocs-ui/components/callout' | |
| import { Step, Steps } from 'fumadocs-ui/components/steps' | |
| import { Tab, Tabs } from 'fumadocs-ui/components/tabs' | |
| import { Image } from '@/components/ui/image' | |
| import { Video } from '@/components/ui/video' | |
| The Guardrails block validates and protects your AI workflows by checking content against multiple validation types. Ensure data quality, prevent hallucinations, detect PII, and enforce format requirements before content moves through your workflow. | |
| <div className="flex justify-center"> | |
| <Image | |
| src="/static/blocks/guardrails.png" | |
| alt="Guardrails Block" | |
| width={500} | |
| height={350} | |
| className="my-6" | |
| /> | |
| </div> | |
| ## Overview | |
| The Guardrails block enables you to: | |
| <Steps> | |
| <Step> | |
| <strong>Validate JSON Structure</strong>: Ensure LLM outputs are valid JSON before parsing | |
| </Step> | |
| <Step> | |
| <strong>Match Regex Patterns</strong>: Verify content matches specific formats (emails, phone numbers, URLs, etc.) | |
| </Step> | |
| <Step> | |
| <strong>Detect Hallucinations</strong>: Use RAG + LLM scoring to validate AI outputs against knowledge base content | |
| </Step> | |
| <Step> | |
| <strong>Detect PII</strong>: Identify and optionally mask personally identifiable information across 40+ entity types | |
| </Step> | |
| </Steps> | |
| ## Validation Types | |
| ### JSON Validation | |
| Validates that content is properly formatted JSON. Perfect for ensuring structured LLM outputs can be safely parsed. | |
| **Use Cases:** | |
| - Validate JSON responses from Agent blocks before parsing | |
| - Ensure API payloads are properly formatted | |
| - Check structured data integrity | |
| **Output:** | |
| - `passed`: `true` if valid JSON, `false` otherwise | |
| - `error`: Error message if validation fails (e.g., "Invalid JSON: Unexpected token...") | |
| ### Regex Validation | |
| Checks if content matches a specified regular expression pattern. | |
| **Use Cases:** | |
| - Validate email addresses | |
| - Check phone number formats | |
| - Verify URLs or custom identifiers | |
| - Enforce specific text patterns | |
| **Configuration:** | |
| - **Regex Pattern**: The regular expression to match against (e.g., for emails) | |
| - **Regex Pattern**: The regular expression to match against (e.g., `^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$` for emails) |
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/docs/content/docs/zh/blocks/guardrails.mdx
Line: 68:135
Comment:
**syntax:** Same corruption as other language versions - regex pattern truncated and entire file duplicated.
```suggestion
- **Regex Pattern**: The regular expression to match against (e.g., `^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$` for emails)
```
How can I resolve this? If you propose a fix, please make it concise.|
Closing this PR - lingo.dev is generating corrupted duplicate content in SDK and guardrails files. Will fix the i18n pipeline and regenerate clean translations. |
Summary
Automated translation updates triggered by changes to documentation.
This PR was automatically created after content changes were made, updating translations for all supported languages using Lingo.dev AI translation engine.
Original trigger: fix(i18n): add additional youtube tools, sync i18n pipeline, remove dated docs (#1632)
Commit: 36f2a62
Workflow: https://github.com/simstudioai/sim/actions/runs/18514989054
Type of Change
Testing
This PR includes automated translations for modified English documentation content:
What reviewers should focus on:
Checklist
Screenshots/Videos